package com.august.shop.order.service;

import com.august.common.to.SecKillOrderTo;
import com.august.shop.order.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.august.common.utils.PageUtils;
import com.august.shop.order.entity.OrderEntity;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author august
 * @email 379249906@qq.com
 * @date 2020-05-18 10:04:48
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 获取订单确认页需要的数据
     * @return
     */
    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    SubmitOrderRespVo submitOrder(OrderSubmitVo orderSubmitVo);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity entity);

    PayVo getOrderPayInfo(String orderSn);

    PageUtils queryPageWhtiItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo payAsyncVo);

    void createSecKillOrder(SecKillOrderTo secKillOrderTo);
}

